#ifndef _UI_KEYBORAD_H
#define _UI_KEYBORAD_H


#define KB_BG_COLOR 		LV_COLOR_WHITE

#define KB_SHEET_LOW		0
#define KB_SHEET_UP			1
#define KB_SHEET_NUM		2
#define KB_SHEET_CNT		3

#define KB_WIDTH_0			27
#define KB_WIDTH_1			23

#define KEY_GROUP_CNT_LOW	43
#define KEY_GROUP_CNT_UP	43
#define KEY_GROUP_CNT_NUM	41

static int kbCurrentKeyNum = 0;
static int kbCurrentSheetNum = 0;
static int kbWidth = CONFIG_SCREEN_WIDTH;
static int kbHeight = CONFIG_SCREEN_HEIGHT / 3 * 2;
static int kbLineBodyHeight;
static int kbLineHeight;

static lv_obj_t		*inputTagTextArea;
static lv_style_t	kbKeyStyle_0;
static lv_style_t	kbKeyStyle_1;
static lv_style_t	kbKeyPress;
static lv_style_t	kbKeyFocused;
static lv_style_t	kbLineStyle;
static lv_style_t	kbKeyLabelStyle_1;
static lv_style_t	kbSheetFlexStyle;

static lv_style_t	keyBodyStyle;

static lv_obj_t		*kbInputLabel;
static lv_obj_t		*kbBody;
static lv_obj_t		*kbInputBody;

static lv_obj_t		*keySheetUp;
static lv_obj_t		*keySheetLow;
static lv_obj_t		*keySheetNum;

static lv_group_t	*kbGroupsNum;
static lv_group_t	*kbGroupsLow;
static lv_group_t	*kbGroupsUp;

typedef struct {
	char *text;
	int width;
	lv_style_t *keyStyle;
} keyType;

typedef struct {
	lv_obj_t *obj;
	bool show;
} kbSheetType;

static kbSheetType kbSheetGroup[KB_SHEET_CNT];


static int keyGroupCnt[3] = {KEY_GROUP_CNT_LOW, KEY_GROUP_CNT_UP, KEY_GROUP_CNT_NUM};

keyType keyGroupLow[KEY_GROUP_CNT_LOW] = {
	{"1#", 25, &kbKeyStyle_0},
	{"q", KB_WIDTH_1, &kbKeyStyle_1},
	{"w", KB_WIDTH_1, &kbKeyStyle_1},
	{"e", KB_WIDTH_1, &kbKeyStyle_1},
	{"r", KB_WIDTH_1, &kbKeyStyle_1},
	{"t", KB_WIDTH_1, &kbKeyStyle_1},
	{"y", KB_WIDTH_1, &kbKeyStyle_1},
	{"u", KB_WIDTH_1, &kbKeyStyle_1},
	{"i", KB_WIDTH_1, &kbKeyStyle_1},
	{"o", KB_WIDTH_1, &kbKeyStyle_1},
	{"p", KB_WIDTH_1, &kbKeyStyle_1},
	{LV_SYMBOL_BACKSPACE, 41, &kbKeyStyle_0},
	{"ABC", 37, &kbKeyStyle_0},
	{"a", KB_WIDTH_1, &kbKeyStyle_1},
	{"s", KB_WIDTH_1, &kbKeyStyle_1},
	{"d", KB_WIDTH_1, &kbKeyStyle_1},
	{"f", KB_WIDTH_1, &kbKeyStyle_1},
	{"g", KB_WIDTH_1, &kbKeyStyle_1},
	{"h", KB_WIDTH_1, &kbKeyStyle_1},
	{"j", KB_WIDTH_1, &kbKeyStyle_1},
	{"k", KB_WIDTH_1, &kbKeyStyle_1},
	{"l", KB_WIDTH_1, &kbKeyStyle_1},
	{LV_SYMBOL_OK, 54, &kbKeyStyle_0},
	{"_", KB_WIDTH_0, &kbKeyStyle_0},
	{"-", KB_WIDTH_0, &kbKeyStyle_0},
	{"z", KB_WIDTH_1, &kbKeyStyle_1},
	{"x", KB_WIDTH_1, &kbKeyStyle_1},
	{"c", KB_WIDTH_1, &kbKeyStyle_1},
	{"v", KB_WIDTH_1, &kbKeyStyle_1},
	{"b", KB_WIDTH_1, &kbKeyStyle_1},
	{"n", KB_WIDTH_1, &kbKeyStyle_1},
	{"m", KB_WIDTH_1, &kbKeyStyle_1},
	{".", KB_WIDTH_0, &kbKeyStyle_0},
	{",", KB_WIDTH_0, &kbKeyStyle_0},
	{":", KB_WIDTH_0, &kbKeyStyle_0},
	{"?", KB_WIDTH_0, &kbKeyStyle_0},
	{"!", KB_WIDTH_0, &kbKeyStyle_0},
	{"=", KB_WIDTH_0, &kbKeyStyle_0},
	{"+", KB_WIDTH_0, &kbKeyStyle_0},
	{" ", 85, &kbKeyStyle_1},
	{"#", KB_WIDTH_0, &kbKeyStyle_0},
	{"*", KB_WIDTH_0, &kbKeyStyle_0},
	{LV_SYMBOL_CLOSE, 57, &kbKeyStyle_0},
};


keyType keyGroupUp[KEY_GROUP_CNT_UP] = {
	{"1#", 25, &kbKeyStyle_0},
	{"Q", KB_WIDTH_1, &kbKeyStyle_1},
	{"W", KB_WIDTH_1, &kbKeyStyle_1},
	{"E", KB_WIDTH_1, &kbKeyStyle_1},
	{"R", KB_WIDTH_1, &kbKeyStyle_1},
	{"T", KB_WIDTH_1, &kbKeyStyle_1},
	{"Y", KB_WIDTH_1, &kbKeyStyle_1},
	{"U", KB_WIDTH_1, &kbKeyStyle_1},
	{"I", KB_WIDTH_1, &kbKeyStyle_1},
	{"O", KB_WIDTH_1, &kbKeyStyle_1},
	{"P", KB_WIDTH_1, &kbKeyStyle_1},
	{LV_SYMBOL_BACKSPACE, 40, &kbKeyStyle_0},
	{"abc", 37, &kbKeyStyle_0},
	{"A", KB_WIDTH_1, &kbKeyStyle_1},
	{"S", KB_WIDTH_1, &kbKeyStyle_1},
	{"D", KB_WIDTH_1, &kbKeyStyle_1},
	{"F", KB_WIDTH_1, &kbKeyStyle_1},
	{"G", KB_WIDTH_1, &kbKeyStyle_1},
	{"H", KB_WIDTH_1, &kbKeyStyle_1},
	{"J", KB_WIDTH_1, &kbKeyStyle_1},
	{"K", KB_WIDTH_1, &kbKeyStyle_1},
	{"L", KB_WIDTH_1, &kbKeyStyle_1},
	{LV_SYMBOL_OK, 53, &kbKeyStyle_0},
	{"_", KB_WIDTH_0, &kbKeyStyle_0},
	{"-", KB_WIDTH_0, &kbKeyStyle_0},
	{"Z", KB_WIDTH_1, &kbKeyStyle_1},
	{"X", KB_WIDTH_1, &kbKeyStyle_1},
	{"C", KB_WIDTH_1, &kbKeyStyle_1},
	{"V", KB_WIDTH_1, &kbKeyStyle_1},
	{"B", KB_WIDTH_1, &kbKeyStyle_1},
	{"N", KB_WIDTH_1, &kbKeyStyle_1},
	{"M", KB_WIDTH_1, &kbKeyStyle_1},
	{".", KB_WIDTH_0, &kbKeyStyle_0},
	{",", KB_WIDTH_0, &kbKeyStyle_0},
	{":", KB_WIDTH_0, &kbKeyStyle_0},
	{"?", KB_WIDTH_0, &kbKeyStyle_0},
	{"!", KB_WIDTH_0, &kbKeyStyle_0},
	{"=", KB_WIDTH_0, &kbKeyStyle_0},
	{"+", KB_WIDTH_0, &kbKeyStyle_0},
	{" ", 85, &kbKeyStyle_1},
	{"#", KB_WIDTH_0, &kbKeyStyle_0},
	{"*", KB_WIDTH_0, &kbKeyStyle_0},
	{LV_SYMBOL_CLOSE, 56, &kbKeyStyle_0},
};

keyType keyGroupNum[KEY_GROUP_CNT_NUM] = {
	{"`", 25, &kbKeyStyle_1},
	{"1", KB_WIDTH_1, &kbKeyStyle_1},
	{"2", KB_WIDTH_1, &kbKeyStyle_1},
	{"3", KB_WIDTH_1, &kbKeyStyle_1},
	{"4", KB_WIDTH_1, &kbKeyStyle_1},
	{"5", KB_WIDTH_1, &kbKeyStyle_1},
	{"6", KB_WIDTH_1, &kbKeyStyle_1},
	{"7", KB_WIDTH_1, &kbKeyStyle_1},
	{"8", KB_WIDTH_1, &kbKeyStyle_1},
	{"9", KB_WIDTH_1, &kbKeyStyle_1},
	{"0", KB_WIDTH_1, &kbKeyStyle_1},
	{LV_SYMBOL_BACKSPACE, 40, &kbKeyStyle_0},
	{"abc", 37, &kbKeyStyle_0},
	{"+", KB_WIDTH_1, &kbKeyStyle_1},
	{"-", KB_WIDTH_1, &kbKeyStyle_1},
	{"/", KB_WIDTH_1, &kbKeyStyle_1},
	{"*", KB_WIDTH_1, &kbKeyStyle_1},
	{"=", KB_WIDTH_1, &kbKeyStyle_1},
	{"%", KB_WIDTH_1, &kbKeyStyle_1},
	{"!", KB_WIDTH_1, &kbKeyStyle_1},
	{"?", KB_WIDTH_1, &kbKeyStyle_1},
	{"#", KB_WIDTH_1, &kbKeyStyle_1},
	{LV_SYMBOL_OK, 53, &kbKeyStyle_0},
	{"\\", KB_WIDTH_0, &kbKeyStyle_1},
	{"@", KB_WIDTH_0, &kbKeyStyle_1},
	{"$", KB_WIDTH_1, &kbKeyStyle_1},
	{"(", KB_WIDTH_1, &kbKeyStyle_1},
	{")", KB_WIDTH_1, &kbKeyStyle_1},
	{"{", KB_WIDTH_1, &kbKeyStyle_1},
	{"}", KB_WIDTH_1, &kbKeyStyle_1},
	{"[", KB_WIDTH_1, &kbKeyStyle_1},
	{"]", KB_WIDTH_1, &kbKeyStyle_1},
	{"\"", KB_WIDTH_0, &kbKeyStyle_1},
	{"<", KB_WIDTH_0, &kbKeyStyle_1},
	{">", KB_WIDTH_0, &kbKeyStyle_1},
	{"^", KB_WIDTH_0, &kbKeyStyle_1},
	{"~", KB_WIDTH_0, &kbKeyStyle_1},
	{";", KB_WIDTH_0, &kbKeyStyle_1},
	{" ", 144, &kbKeyStyle_1},
	{".", KB_WIDTH_0, &kbKeyStyle_1},
	{LV_SYMBOL_CLOSE, 56, &kbKeyStyle_0},
};

static void kbSendkeyEvent(lv_event_code_t eventCode) {
	lv_obj_t *currentObj = lv_obj_get_child(kbSheetGroup[kbCurrentSheetNum].obj, kbCurrentKeyNum);
	lv_obj_t *currentObjChild = lv_obj_get_child(currentObj, 0);
	lv_event_send(currentObjChild, eventCode, NULL);
}

static void kbRotA() {
	kbSendkeyEvent(LV_EVENT_DEFOCUSED);
	if(kbCurrentKeyNum < keyGroupCnt[kbCurrentSheetNum] - 1) {
		kbCurrentKeyNum++;
	}
	else {
		kbCurrentKeyNum = 0;
	}
	kbSendkeyEvent(LV_EVENT_FOCUSED);
}

static void kbRotB() {
	kbSendkeyEvent(LV_EVENT_DEFOCUSED);
	if(kbCurrentKeyNum > 0) {
		kbCurrentKeyNum--;
	}
	else {
		kbCurrentKeyNum = keyGroupCnt[kbCurrentSheetNum] - 1;
	}
	kbSendkeyEvent(LV_EVENT_FOCUSED);
}

static void kbRotC() {
	kbSendkeyEvent(LV_EVENT_PRESSED);
}

static void kbSetRotFun() {
	rotFunSet(&kbRotA, &kbRotB, &kbRotC);
}

static void kbInitStyle() {
	LVMT;
	// 按键行容器
	lv_style_init(&kbLineStyle);
	lv_style_set_width(&kbLineStyle, kbWidth);
	lv_style_set_height(&kbLineStyle, kbLineHeight);
	lv_style_set_layout(&kbLineStyle, LV_LAYOUT_FLEX);
	lv_style_set_flex_flow(&kbLineStyle, LV_FLEX_FLOW_ROW);
	lv_style_set_flex_main_place(&kbLineStyle, LV_FLEX_ALIGN_SPACE_AROUND);
	lv_style_set_flex_cross_place(&kbLineStyle, LV_FLEX_ALIGN_CENTER);
	lv_style_set_bg_opa(&kbLineStyle, LV_OPA_0);

	lv_style_init(&keyBodyStyle);
	lv_style_set_height(&keyBodyStyle, kbLineBodyHeight);
	lv_style_set_radius(&keyBodyStyle, 0);
	lv_style_set_bg_opa(&keyBodyStyle, LV_OPA_0);
	
	// 符号按键
	lv_style_init(&kbKeyStyle_0);
	lv_style_set_height(&kbKeyStyle_0, kbLineHeight);
	lv_style_set_radius(&kbKeyStyle_0, 5);
	lv_style_set_bg_color(&kbKeyStyle_0, lv_color_hex(0xEEEEEE));
	lv_style_set_bg_opa(&kbKeyStyle_0, LV_OPA_COVER);
	// 字母按键
	lv_style_init(&kbKeyStyle_1);
	lv_style_set_height(&kbKeyStyle_1, kbLineHeight);
	lv_style_set_radius(&kbKeyStyle_1, 5);
	lv_style_set_bg_color(&kbKeyStyle_1, LV_COLOR_WHITE);
	lv_style_set_bg_opa(&kbKeyStyle_1, LV_OPA_COVER);
	// 按键按下的样式
	lv_style_init(&kbKeyPress);
	lv_style_set_bg_color(&kbKeyPress, lv_color_hex(0x1F8BEA));
	lv_style_set_text_color(&kbKeyPress, LV_COLOR_WHITE);
	// 按键获取焦点的样式
	lv_style_init(&kbKeyFocused);
	lv_style_set_bg_color(&kbKeyFocused, lv_color_hex(0xD9F3FF));
	// 字体
	lv_style_init(&kbKeyLabelStyle_1);

	// 键盘
	lv_style_init(&kbSheetFlexStyle);
	lv_style_set_width(&kbSheetFlexStyle, kbWidth);
	lv_style_set_height(&kbSheetFlexStyle, kbHeight);
	lv_style_set_align(&kbSheetFlexStyle, LV_ALIGN_BOTTOM_MID);
	lv_style_set_layout(&kbSheetFlexStyle, LV_LAYOUT_FLEX);
	lv_style_set_flex_flow(&kbSheetFlexStyle, LV_FLEX_FLOW_ROW_WRAP);
	lv_style_set_flex_main_place(&kbSheetFlexStyle, LV_FLEX_ALIGN_SPACE_AROUND);
	lv_style_set_flex_cross_place(&kbSheetFlexStyle, LV_FLEX_ALIGN_SPACE_BETWEEN);
	lv_style_set_bg_color(&kbSheetFlexStyle, LV_COLOR_MAIN_BG_3);
	lv_style_set_bg_opa(&kbSheetFlexStyle, LV_OPA_COVER);
	LVMG;
}

// 关闭键盘
static void kbHiden() {
	lv_label_set_text((lv_obj_t *)kbInputLabel, "");
	lv_obj_add_flag(kbBody, LV_OBJ_FLAG_HIDDEN);
	lv_obj_add_flag(kbInputBody, LV_OBJ_FLAG_HIDDEN);
	lv_obj_add_flag(keySheetUp, LV_OBJ_FLAG_HIDDEN);
	lv_obj_add_flag(keySheetLow, LV_OBJ_FLAG_HIDDEN);
	lv_obj_add_flag(keySheetNum, LV_OBJ_FLAG_HIDDEN);
}

// 完成
static void kbDone() {
	rotFunGoBack();
	char *text = lv_label_get_text((const lv_obj_t *)kbInputLabel);
	lv_textarea_set_text(inputTagTextArea, text);
	kbHiden();
}

// 显示不同的键盘
static void kbShowSheet(int sheetNum) {
	kbCurrentSheetNum = sheetNum;
	kbCurrentKeyNum = 0;
	kbSendkeyEvent(LV_EVENT_FOCUSED);
	for(int i = 0; i < KB_SHEET_CNT; i++) {
		kbSheetGroup[i].show = false;
		lv_obj_add_flag(kbSheetGroup[i].obj, LV_OBJ_FLAG_HIDDEN);
	}
	kbSheetGroup[sheetNum].show = true;
	lv_obj_move_foreground(kbSheetGroup[sheetNum].obj);
	lv_obj_clear_flag(kbSheetGroup[sheetNum].obj, LV_OBJ_FLAG_HIDDEN);
} 

// 显示键盘
void kbShow(lv_obj_t *tagTextArea, int sheetNum) {
	kbSetRotFun();
	const char *currentText = lv_textarea_get_text(tagTextArea);
	lv_label_set_text((lv_obj_t *)kbInputLabel, currentText);
	inputTagTextArea = tagTextArea;
	lv_obj_move_foreground(kbBody);
	lv_obj_move_foreground(kbInputBody);
	lv_obj_clear_flag(kbBody, LV_OBJ_FLAG_HIDDEN);
	lv_obj_clear_flag(kbInputBody, LV_OBJ_FLAG_HIDDEN);
	kbShowSheet(sheetNum);
}

// 按键控制
static void kbKeyPressCb(lv_event_t *e) {
	lv_event_code_t code = lv_event_get_code(e);
	lv_obj_t *obj = lv_event_get_target(e);
	if(code == LV_EVENT_PRESSED) {
		char *text = lv_event_get_user_data(e);
		if(strcmp(text, "1#") == 0)  {
			kbShowSheet(KB_SHEET_NUM);
			return;
		}
		else if(strcmp(text, "ABC") == 0) {
			kbShowSheet(KB_SHEET_UP);
			return;
		}
		else if(strcmp(text, "abc") == 0) {
			kbShowSheet(KB_SHEET_LOW);
			return;
		}
		else if(strcmp(text, LV_SYMBOL_BACKSPACE) == 0) {
			char *inputText = lv_label_get_text((const lv_obj_t *)kbInputLabel);
			size_t len = strlen(inputText);
			if(len > 0) {
				char tempText[len];
				strncpy(tempText, inputText, len - 1);
				tempText[len - 1] = '\0';
				lv_label_set_text((lv_obj_t *)kbInputLabel, tempText);
			}
			return;
		}
		else if(strcmp(text, LV_SYMBOL_OK) == 0) {
			kbDone();
			return;
		}
		else if(strcmp(text, LV_SYMBOL_CLOSE) == 0) {
			kbHiden();
			return;
		}
		else {
			lv_label_ins_text((lv_obj_t *)kbInputLabel, LV_LABEL_POS_LAST, text);
		}
		
		return;
	}
	else if(code == LV_EVENT_PRESSING) {
		lv_obj_add_style(obj, &kbKeyPress, 0);
		return;
	}
	else if(code == LV_EVENT_RELEASED) {
		lv_obj_remove_style(obj, &kbKeyPress, 0);
		return;
	}
	else if(code == LV_EVENT_FOCUSED) {
		lv_obj_add_style(obj, &kbKeyFocused, 0);
		return;
	}
	else if(code == LV_EVENT_DEFOCUSED) {
		lv_obj_remove_style(obj, &kbKeyFocused, 0);
		return;
	}
}

// 添加按键
static void kbAddKey(keyType kGroup[], int len, lv_obj_t *keySheet) {
	for(int i = 0; i < len; i ++) {
		lv_obj_t *keyBodyObj = lv_obj_create(keySheet);
		lv_obj_remove_style_all(keyBodyObj);
		lv_obj_add_style(keyBodyObj, &keyBodyStyle, 0);
		lv_obj_set_style_width(keyBodyObj, kGroup[i].width, 0);

		lv_obj_t *keyObj = lv_obj_create(keyBodyObj);
		lv_obj_remove_style_all(keyObj);
		lv_obj_center(keyObj);
		lv_obj_add_style(keyObj, kGroup[i].keyStyle, 0);
		lv_obj_set_style_width(keyObj, kGroup[i].width, 0);
		lv_obj_add_event_cb(keyObj, kbKeyPressCb, LV_EVENT_ALL, kGroup[i].text);

		lv_obj_t *keyLabel = lv_label_create((lv_obj_t *)keyObj);
		lv_obj_center(keyLabel);
		lv_obj_add_style(keyLabel, &kbKeyLabelStyle_1, 0);
		lv_label_set_text(keyLabel, kGroup[i].text);
	}
}

/* 键盘的初始化 */
void keyboradInit() {
	// dispInitInfo("Init keyborad...");
	kbLineBodyHeight = kbHeight / 4;
	kbLineHeight = (kbHeight - 5) / 4;

	kbInitStyle();
	kbGroupsLow = lv_group_create();
	kbGroupsUp = lv_group_create();
	kbGroupsNum = lv_group_create();
	LVMT;
	int inputWidth = 260;
	// 键盘主体
	kbBody = lv_obj_create(root);
	lv_obj_add_flag(kbBody, LV_OBJ_FLAG_HIDDEN);
	lv_obj_remove_style_all(kbBody);
	lv_obj_set_size(kbBody, CONFIG_SCREEN_WIDTH, CONFIG_SCREEN_HEIGHT);
	lv_obj_center(kbBody);
	lv_obj_set_style_bg_color(kbBody, LV_COLOR_MAIN_BG_3, 0);
	lv_obj_set_style_bg_opa(kbBody, LV_OPA_50, 0);

	// 输入框
	kbInputBody = lv_obj_create(kbBody);
	lv_obj_add_flag(kbInputBody, LV_OBJ_FLAG_HIDDEN);
	lv_obj_remove_style_all(kbInputBody);
	lv_obj_set_size(kbInputBody, inputWidth, 30);
	lv_obj_set_style_bg_color(kbInputBody, lv_color_hex(0xffffff), 0);
	lv_obj_set_style_border_color(kbInputBody, lv_color_hex(0xaaaaaa), 0);
	lv_obj_set_style_border_width(kbInputBody, 1, 0);
	lv_obj_set_style_bg_opa(kbInputBody, LV_OPA_COVER, 0);
	lv_obj_align(kbInputBody, LV_ALIGN_TOP_MID, 0, 35);
	lv_obj_set_style_radius(kbInputBody, 5, 0);

	kbInputLabel = lv_label_create(kbInputBody);
	lv_label_set_text(kbInputLabel, "");
	lv_obj_center(kbInputLabel);
	lv_obj_set_style_bg_opa(kbInputLabel, LV_OPA_COVER, 0);
	lv_obj_set_size(kbInputLabel, inputWidth - 10, 18);
	lv_obj_set_style_text_align(kbInputLabel, LV_TEXT_ALIGN_LEFT, 0);

	// 大写字符
	keySheetUp = lv_obj_create(kbBody);
	lv_obj_add_flag(keySheetUp, LV_OBJ_FLAG_HIDDEN);
	lv_obj_remove_style_all(keySheetUp);
	lv_obj_add_style(keySheetUp, &kbSheetFlexStyle, 0);

	// 小写字符
	keySheetLow = lv_obj_create(kbBody);
	lv_obj_add_flag(keySheetLow, LV_OBJ_FLAG_HIDDEN);
	lv_obj_remove_style_all(keySheetLow);
	lv_obj_add_style(keySheetLow, &kbSheetFlexStyle, 0);
	

	// 符号
	keySheetNum = lv_obj_create(kbBody);
	lv_obj_add_flag(keySheetNum, LV_OBJ_FLAG_HIDDEN);
	lv_obj_remove_style_all(keySheetNum);
	lv_obj_add_style(keySheetNum, &kbSheetFlexStyle, 0);

	// 生成键盘
	kbAddKey(keyGroupUp, KEY_GROUP_CNT_UP, keySheetUp);
	kbAddKey(keyGroupLow, KEY_GROUP_CNT_LOW, keySheetLow);
	kbAddKey(keyGroupNum, KEY_GROUP_CNT_NUM, keySheetNum);

	// 添加键盘到控制组
	kbSheetGroup[KB_SHEET_LOW] = (kbSheetType){keySheetLow, false};
	kbSheetGroup[KB_SHEET_UP] = (kbSheetType){keySheetUp, false};
	kbSheetGroup[KB_SHEET_NUM] = (kbSheetType){keySheetNum, false};
	LVMG;
	// dispInitInfo("Keyborad init done.");
}

#endif